package com.itheima.a08InnerClassDemo5;

public class Outer {
    int b = 20;

    public void show(){
        int a = 10;

        // 局部内部类
        class Inner{
            String name;
            int age;
            public void method1(){
                System.out.println(a);
                System.out.println(b);
                System.out.println("Method 1");
            }

            public static void method2(){
                System.out.println("Static Method 2");
            }
        }

        Inner i = new Inner();
        System.out.println(i.name);
        System.out.println(i.age);
        i.method1();
        Inner.method2();
    }
}
